projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64e23c4
)
Restore functionality where ellipsizing label *minimum* size grows to "max-char-width".
author
Tristan Van Berkom
<tristan.van.berkom@gmail.com>
Sun, 18 Apr 2010 03:06:24 +0000
(23:06 -0400)
committer
Tristan Van Berkom
<tristan.van.berkom@gmail.com>
Sun, 18 Apr 2010 03:06:24 +0000
(23:06 -0400)
gtk/gtklabel.c
patch
|
blob
|
history
diff --git
a/gtk/gtklabel.c
b/gtk/gtklabel.c
index 07546a3250ea21f777aaa485a7a82cfad0dcfcb8..911b790e2e7c21c0d157e8fce847baf2a89f7122 100644
(file)
--- a/
gtk/gtklabel.c
+++ b/
gtk/gtklabel.c
@@
-2994,6
+2994,15
@@
get_label_char_width (GtkLabel *label,
gint max_char_width = char_pixels * priv->max_width_chars;
gint max_width = MIN (text_width, max_char_width);
+ /* With max-char-width specified, we let the minimum widths of
+ * ellipsized text crawl up to the max-char-width
+ * (note that we dont want to limit the minimum width for wrapping text).
+ */
+ if (label->ellipsize)
+ {
+ *minimum = MIN (text_width, max_width);
+ }
+
*natural = MAX (rect.width, max_width);
}
}